/*
package com.yhx.security.icbcGuomi.sign;

import com.yhx.security.icbcGuomi.Util;
import org.bouncycastle.util.encoders.Base64;

public class SignTest1 {

    public static void main(String[] args) throws Exception{
        String plainText = "zlIqz5P3MNx0WWoYUMGBXw==";
        byte[] sourceData = plainText.getBytes();

        // 国密规范测试私钥
        String prik = "3945208f7b2144b13f36e38ac6d39f95889393692860b51a42fb81ef4df7c5b8";
        String prikS = new String(Base64.encode(Util.hexToByte(prik)));
        System.out.println("prikS: " + prikS);
        System.out.println("");

        String userId = "1234567812345678";

        System.out.println("ID: " + Util.getHexString(userId.getBytes()));
        System.out.println("");

        System.out.println("签名: ");
        byte[] c = SM2Util.sign(userId.getBytes(), Base64.decode(prikS.getBytes()), sourceData);
        System.out.println("sign: " + Util.getHexString(c));
        System.out.println("");

        // 国密规范测试公钥
        String pubk = "040AE4C7798AA0F119471BEE11825BE46202BB79E2A5844495E97C04FF4DF2548A7C0240F88F1CD4E16352A73C17B7F16F07353E53A176D684A9FE0C6BB798E857";
        pubk=  "04"+"09f9df311e5421a150dd7d161e4bc5c672179fad1833fc076bb08ff356f35020"+"ccea490ce26775a52dc6ea718cc1aa600aed05fbf35e084a6632f6072da9ad13";
       // pubk="04A9E343C21B3DE3062C79822CD122222A1BBCC6DA0A3B527AEAD56772EC6AEC1B17A50DD7D95B74CF007C07DE8562F50521A8D308603F239AA8CF8F2620660163";
        String pubkS = new String(Base64.encode(Util.hexToByte(pubk)));
        System.out.println("pubkS: " + pubkS);
        System.out.println("");
        String si=new String(Base64.encode(c));
        System.out.println("si="+si);

        String cstr="t1xRukhIiPGS4MGZv3NESAGX0jV53J/bXA2/wirOeZXOkgB1vqlZVaIcfEwGRekdEO+0AgyhPiUiEk0EhatakNhuTOeBOdiLJBhRIYXX6FMk3Qze+WakHc8tBwIhS/7SbCcPP/Vli9iiwnvYRI6iUpTWaD8oddJV0dB4hHkBTLXkIsrWDMSGtVnA5Djen4ouJT9P2Pk8UKNXkaGNioGHmamNBaLVaAEpzAT0vk+6mts=";
        String cc="MEQCICByA4m8rDjer6lI1J09Y3f9gKpAY21eisopw8iYLXQjAiAkH3/B9IOfZPw5u20cjH/y9VMQnMPH6jk5KyV0vXdKhw==";
        cstr="iUofaEH3KgI0R1XSxJE07jjgiKg7ilS5Gs9bMQ0OCMTWxxZHnmmjJ2WrvOWngBunX608Wp/Nn5xeCuYBKRDo0DnUAYx8Ti9jOMUXY5+QFTU=";
        cc="MEQCID43ANj8gT9BTIGzy9bHsAT6ytpLYiJskg9Z62goap7dAiBDuBOf38AH6FIUqE6KsLHfgYUbDJ19vDOE027JOWtOzQ==";
        System.out.println("验签 ");
        boolean vs = SM2Util.verifySign(userId.getBytes(), Base64.decode(pubkS.getBytes()), plainText.getBytes(), Base64.decode(si));
        vs = SM2Util.verifySign(userId.getBytes(), Base64.decode(pubkS.getBytes()), cstr.getBytes(), Base64.decode(cc));
        System.out.println("验签结果： " + vs);
        System.out.println("");
    }
}
*/
